/* Copyright (c) 2025 Beijing Semidrive Technology Corporation
 * SPDX-License-Identifier: Apache-2.0
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/** *****************************************************************************************************
 *  \file     Sent_Etimer_Ip.h                                                                          *
 *  \brief    This file contains interface header for SENT_ETIMER MCAL driver                           *
 *                                                                                                      *
 * <table>                                                                                              *
 * <tr><th>Date           <th>Version                                                                   *
 * <tr><td>2025/02/14     <td>1.0.0                                                                     *
 * </table>                                                                                             *
 *******************************************************************************************************/
#ifndef SENTETIMER_IP_H
#define SENTETIMER_IP_H
/********************************************************************************************************
 *                                      Include header files                                            *
 *******************************************************************************************************/
#include "SentEtimer_Cfg.h"
#include "SentEtimer_Types.h"

#define TIMER_MODULE_NUMBER     (4U)
#define LOCAL_CHANNEL_NUMBER    (4U)

extern SentEtimer_Channel SentEtimer_FrameInfo[SENT_NUM_CHANNELS];

uint8 SentEtimer_Ip_Crc4CalculateWithTable2008(uint8 initial_value, uint8 const *message, uint8 len);
/* PRQA S 0777 1*/
uint8 SentEtimer_Ip_Crc4CalculateWithTable2010(uint8 initial_value, uint8 const *message, uint8 len);

void SentEtimer_Ip_SetBaseAddr(void);

void SentEtimer_Ip_ChannelInit(uint8 eChannel, const SentEtimer_ChannelConfigType *pChannelConfig);

void SentEtimer_Ip_ChannelDeInit(uint8 ChannelId, const SentEtimer_ChannelConfigType *pChannelConfig);

void SentEtimer_Ip_StartReciever(uint8 ChannelId, const SentEtimer_HwChannelConfigType *pHwChannelConfig);

void SentEtimer_Ip_StopReciever(uint8 ChannelId, const SentEtimer_HwChannelConfigType *pHwChannelConfig);

void SentEtimer_Ip_Parse_Massage(uint8 ChannelId, const SentEtimer_ChannelConfigType *ChannelConfig);

uint32 SentEtimer_Ip_GetInterrupt(uint8 eModule);

void SentEtimer_Ip_ClearInterrupt(uint8 eModule, uint8 Position);

#endif /* SENTETIMER_IP_H */
/* End of file */
